<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" MasterPageFile="~/MasterPage.master" Inherits="Index" %>
<%@ Import Namespace="ClickNET.Imaging" %>
<%@ Register TagPrefix="cn" Assembly="ClickNET.Web" Namespace="ClickNET.Web.UI.Controls" %>
<asp:Content runat="server" ContentPlaceHolderID="mainContent">
    <asp:Repeater runat="server" ID="dlPictures">
        <HeaderTemplate>
            <div class="midtitle">
                <h1>
                    <asp:Label runat="server" ID="c_galleryTitle" /></h1>
                <ul class="ThumbNailViewList">
                    <li><a href="default.aspx">
                        <img src="/images/icons/22/return.png" alt="Return to Gallery List" style="vertical-align: middle;" />&nbsp;Return
                        to Gallery List</a></li>
                    <li><a href="#">
                        <img src="/images/icons/22/gear2.png" alt="Modify Gallery" style="vertical-align: middle;" />&nbsp;&nbsp;#Update
                        Gallery Information#</a></li>
                </ul>
            </div>
        </HeaderTemplate>
        <ItemTemplate>
            <div id="thumbwrap">
                <a href="/viewimage.aspx?galleryName=<%# ((Picture)Container.DataItem).FolderName %>&fileName=<%# ((Picture)Container.DataItem).FileName %>">
                    <cn:GalleryImage runat="server" Picture='<%#Container.DataItem%>' ThumbSize="100" />
                    <p class="caption">
                        <%# ((Picture)Container.DataItem).Title%></p>
                    <span class="caption2">
                        <p style="padding: 0; margin: 0;">
                            <%# ((Picture)Container.DataItem).GetHumanReadableFileSize()%></p>
                        <%# ((Picture)Container.DataItem).Description%></span></a>
            </div>
        </ItemTemplate>
    </asp:Repeater>
    <asp:Repeater runat="server" ID="dlGalleries">
        <HeaderTemplate>
            <div style="margin-bottom: 10px;">
        </HeaderTemplate>
        <ItemTemplate>
            <div style="width: 300px; height: 100px; margin: 10px; float: left;">
                <a href="?gallery=<%# ((Gallery)Container.DataItem).FolderName %>">
                    <table cellpadding="0">
                        <tr>
                            <td>
                                <cn:GalleryImage ID="GalleryImage1" runat="server" Picture='<%#((Picture)((Gallery)Container.DataItem).GetFirstPicture())%>' ThumbSize="100" />
                            </td>
                            <td valign="top">
                                <p class="gallery-link-title">
                                    <%# ClickNET.Utility.StringConversion.GetEllipsisText(((Gallery)Container.DataItem).Title, 25) %></p>
                                <p class="gallery-link-description">
                                    <%# ((Gallery)Container.DataItem).Description %></p>
                                <p class="gallery-link-count">
                                    <%# ((Gallery)Container.DataItem).Pictures.Count %>
                                    Photos</p>
                            </td>
                        </tr>
                    </table>
                </a>
            </div>
        </ItemTemplate>
        <FooterTemplate>
            </div>
        </FooterTemplate>
    </asp:Repeater>
</asp:Content>
